package com.maxvision.mybatis.task;

import cn.hutool.log.Log;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Component;

import java.util.concurrent.Callable;

/**
 * 类说明
 *
 * @author HuangRongFu
 * @date 2022/12/21
 */

@Component
@Log4j2
public class asyncTask implements Callable<String> {
   
   
    @Override
    public String call() throws Exception {
       
        log.info(Thread.currentThread().getName() + "执行任务");
        Thread.sleep(1000);
        
        return Thread.currentThread().getName() + "异步执行完成";
    }
    
    
    
}
